<%@ page language="java" contentType="text/html; charset=GBK" pageEncoding="utf-8"%>
<!DOCTYPE html>
<html  style="text-align:center;">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=GBK" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=0.4, user-scalable=no" />  <!-- 移动端用户不可缩放页面 -->
  <title>华工xx同乡会</title>
  <link rel="stylesheet" type="text/css" href="css/ActionHomePage/style.css" />
  <link rel="stylesheet" type="text/css" href="css/AdminManage/AdminManage.css" />
  <script src="js/public/jquery-2.1.4.min.js"></script>
  <script src="js/ActionHomePage/singleActionInfo/singleActionInfoScript.js"></script>
  <script src="js/AdminManage/AdminManage.js"></script>
  <script src="js/ActionHomePage/script.js"></script>  
  <script type="text/javascript">
  
  window.onresize=function(){
 	 var w=window.innerWidth
      || document.documentElement.clientWidth
      || document.body.clientWidth;
      var _w = parseInt(w);   //获取屏幕宽度
      if(_w>1200){
 		 var v = (_w -1200)/2;
 		 _w = 1200;
 		 $("#wrap").css("width","1200px");
 		 $("#wrap").css("margin-left",(v-8)+"px");
         $("#wrap").css("margin-right",(_w+v-8)+"px");
         
         $(".blackC_t").css("width","1200px");
         $(".blackC_t").css("height","120px");         
         $("#tbar").css("width","1200px"); 
         $("#tbar").css("height","120px"); 
         
      }else{
 		 $("#wrap").css("width","100%");
 		 $("#wrap").css("margin-left",-8+"px");
         //$("#wrap").css("margin-right",-8+"px");
         
         $(".blackC_t").css("width",_w+"px");
         $(".blackC_t").css("height",(_w*0.1)+"px");
         $("#tbar").css("width",_w+"px");
         $("#tbar").css("height",(_w*0.1)+"px");
      }
  }
  
  window.onload = function(){
	  window.page = 0;
	  window.pageSize = 16;
	  window.account = null;
  	  window.user_name = null;
  	  window.gender = null;
  	  window.major = null;
  	  window.grade = null;
	  load();
  }
  
    function load(){
		window.account = $('#account')[0].value;
    	window.user_name = $('#user_name')[0].value;
    	window.gender = $('#gender')[0].value;
    	window.major = $('#major')[0].value;
    	window.grade = $('#grade')[0].value; 	
		var account = window.account==null?"":window.account;
 		var user_name= (window.user_name==null)||(window.user_name=="")?"":window.user_name;
 		var gender = window.gender==null?"":window.gender;
 		var major= (window.major==null)||(window.major=="")?"":window.major;
 		var grade = window.grade==null?"":window.grade;
		$.ajax({
			url:'SearchUser',     
  	        datatype: "json", 
  	        type: "POST",
  	        processData:false,
  	        data:"page="+window.page+"&pageSize="+window.pageSize+"&user_account="+account+"&name="+user_name+"&gender="+gender+"&grade="+grade+"&major="+major,
	        success:function(data){
	        	window.count = parseInt(data['count']);
				addList(data);
			},
			error:function(){
				alert('数据加载失败...服务器连接失效或者请检查网络连接是否正常...')
			}
		});
	}
	
	function addList(data){
		  $('#user_list').empty();
		  var list = "<tr><th>用户名</th><th>真实姓名</th><th>年级</th><th>专业</th><th>注册时间</th>";
		  for(var i=0;i<data['result'].length;i++){
			  var head = "<tr>";
/* 			  var checkResLink_url = "<a href=\"CheckResLink?sid="+data['result'][i]['id']+"\">"+data['result'][i]['link_name']+"</a>";
			  var link_name = "<td>"+checkResLink_url+"</td>"; */
			  var href = "<a href='OthersCheckUserInfo?uid="+data['result'][i]['account']['id']+"'>"+data['result'][i]['account']['account']+"</a>";
			  var account = "<td>"+href+"</td>";
			  var name = "<td>"+data['result'][i]['user_name']+"</td>";
			  var grade = "<td>"+data['result'][i]['grade']+"</td>";
			  var major = "<td>"+data['result'][i]['major']+"</td>";
			  var register_time = "<td>"+data['result'][i]['account']['register_time'].replace("T"," ")+"</td>";
			  var rend = "</tr>";
			  list += head + account + name + grade + major + register_time + rend;
		  }
		  list+="";
		  $('#user_list').html(list);			  
	}
	
	function prePage(){
		  if(((window.count/window.pageSize)-1)>window.page){
			  window.page += 1;
			  load();
		  }else{
			  alert("当前已为最后一页...");
		  }
	}
	
	function lastPage(){
		  if(window.page>0){
			  window.page -= 1;		  
			  load();
		  }else{
			  alert('当前为首页.');
		  }
	}
  </script>
</head>

<body style="width:100%;height:100%;background-color:#333333;">
   <div id="wrap" style="width:100%;margin-top:-8px;margin-left:-8px;height:100%;">
   	 <div class="blackC_t">
	 </div>
     <div id="tbar" class="topbar">
	  <div style="display:inline;">
	     <img style="max-width:8.296%;max-height:80%;vertical-align: middle;width:8.296%;height:80%;" src="image/homepage/u6.png"/>
	  </div>
	  <div style="font-family:微软雅黑;color:#00CCFF;display:inline;">
	     <div style="display:inline;">
		   <span>
	          <strong>华工xx同乡会</strong>
	       </span>
		 </div>
		 <div style="padding-left:18%;display:inline;">
		   <div class="barEl" onmouseover="cc($(this))" onmouseout="ccb($(this))"style="color:#00CCFF;" onclick="window.location = 'pfs?p=homepage/homepage.jsp';">首页</div>&nbsp;&nbsp;&nbsp;
           <div class="barEl" onmouseover="cc($(this))" onmouseout="ccg($(this))"style="color:#CCFF00;" onclick="window.location = 'pfs?p=ActionHomePage/actionHomePage.jsp';">活动中心</div>&nbsp;&nbsp;&nbsp;
           <div class="barEl" onmouseover="cc($(this))" onmouseout="ccr($(this))"style="color:#FF9900;">资讯</div>&nbsp;&nbsp;&nbsp;
           <%
	            String i = (String)session.getAttribute("user_account");
	           	if(i==null)
	           		out.print("<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccb($(this))\" style=\"color:#00CCFF;\" onclick=\"window.location='pfs?p=login/login.jsp';\">登录</div>&nbsp;&nbsp;&nbsp;"+
	 	                      "<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccg($(this))\" onclick=\"window.location='pfs?p=register/register.jsp';\" style=\"color:#CCFF00;\">注册</div>&nbsp;&nbsp;&nbsp;");
	           	else
	           		out.print("<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccb($(this))\" style=\"color:#00CCFF;\" onclick=\"window.location='CheckUserInfo';\" >"+i+"</div>&nbsp;&nbsp;&nbsp;"+
	 	                      "<div class=\"barEl\" onmouseover=\"cc($(this))\" onmouseout=\"ccg($(this))\" onclick=\"window.location='LoginOut';\" style=\"color:#CCFF00;\">退出</div>&nbsp;&nbsp;&nbsp;");	            
	 	    %>     
		 </div>
	  </div>
     </div>
     <div id="top" style="background-color:#333333;text-align:left;width:100%;">
       <div style="padding:10% 0% 10% 0%;color:#FFFFFF;">
         <div style="display:inline;margin-left:40%;">
            <span style="font-family:微软雅黑;font-size:3em;">
               <strong>管理员中心</strong>
            </span>
         </div>
       </div>
     </div>
     <div id="v" style="font-family:微软雅黑;background-color:#FFFFFF;width:100%;">
        <br/>
        <span style="color:#333333;font-family:Microsoft YaHei;font-size:2em;">
           <strong>用户管理</strong>
        </span><br/><br/><br/>
        <div>
           <div style="background-color:#FFFFFF;width:70%;display:inline-block;vertical-align:top;">
	     
               <div style="padding-left:0%;text-align:center;">
			       <h3>查找用户</h3>
				   <div class="div" style="">
					<form>
						<table id="search_list" style="margin-left:15%;text-align:left;">
							<tr>
								<td>						 
									<label class="label">用户名</label>
									<input id="account" class="inputTxt" type="text" /><br/><br/>
								</td>
								<td>
									<label class="label">性别</label>
									<select id="gender" class="inputTxt">
										<option value="" selected="selected"></option>										
										<option value="boy">男</option>
										<option value="girl">女</option>
									</select><br/><br/>
								</td>
								<td>
									<label class="label">专业</label>
									<input id="major" type="text" class="inputTxt"/><br/><br/>
								</td>
							</tr>
							<tr>
								<td>
									<label class="label">真实姓名</label>
									<input id="user_name" type="text" class="inputTxt"/><br/><br/>
								</td>
								<td>
									<label class="label">年级</label>	
									<input id="grade" type="text" class="inputTxt" /><br/><br/>
								</td>
							</tr>
						</table>
					</form>
					<button style="font-family:Microsoft YaHei;font-size:16px;width:60px;color:#00CCFF;" onclick="load();">搜索</button>
		           </div>
		           <h3>用户列表</h3>
					   <table  id="user_list" style="width:100%">
							<tr><td>大头蔡</td><td>2013</td><td>临床医学</td><td>2016-1-15 19:35</td><td>已认证</td></tr>
					   </table>
						<p class="xsi">
							<span>共</span>8<span>条消息</span>
							<span>1</span>页</span>&nbsp;&nbsp;&nbsp;
							<span>第一页</span>&nbsp;&nbsp;&nbsp;
							<span>前往该页</span>&nbsp;&nbsp;&nbsp;
							<input/>
							<span style="cursor:pointer;" onclick="prePage();">上一页</span>&nbsp;&nbsp;&nbsp;
							<span style="cursor:pointer;" onclick="lastPage();">下一页</span>
						</p>		   
               </div>
           </div>
           <div style="box-shadow:0px 0px 8px 0px #00CCFF;background-color:#00FFFF;width:20%;display:inline-block;">
           	   <div class="si">
           	   	   <span style="color:#333333;">
           	   	      <strong>管理面板</strong>
           	   	   </span>
           	   	   <ul style="list-style:none;margin-left:-40px;">
           	   	   	  <li>
           	   	   	  	<div class="wcBoard">
           	   	   	  		<span>
           	   	   	  			用户管理
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
           	   	   	  <li>
           	   	   	  	<div class="wcBoard">
           	   	   	  		<span>
           	   	   	  			查找用户
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
           	   	   	  <li>
           	   	   	  	<div class="xncBoard" onmouseover="mouseOverNcboard($(this));" onmouseout="mouseOutNcboardx($(this));">
           	   	   	  		<span>
           	   	   	  			用户身份认证请求
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
           	   	   	  <li>
           	   	   	  	<div class="xncBoard" onmouseover="mouseOverNcboard($(this));" onmouseout="mouseOutNcboardx($(this));">
           	   	   	  		<span>
           	   	   	  			我受理的请求
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
           	   	   	  <li>
           	   	   	  	<div class="ncBoard" onmouseover="mouseOverNcboard($(this));" onmouseout="mouseOutNcboard($(this));" onclick="window.location = 'html/AdminManage/albumList.html';">
           	   	   	  		<span>
           	   	   	  			活动管理
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
					  <li>
           	   	   	  	<div class="ncBoard" onmouseover="mouseOverNcboard($(this));" onmouseout="mouseOutNcboard($(this));">
           	   	   	  		<span>
           	   	   	  			资源共享管理
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
					  <li>
           	   	   	  	<div class="ncBoard" onmouseover="mouseOverNcboard($(this));" onmouseout="mouseOutNcboard($(this));">
           	   	   	  		<span>
           	   	   	  			资讯中心
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
					  <li>
           	   	   	  	<div class="ncBoard" onmouseover="mouseOverNcboard($(this));" onmouseout="mouseOutNcboard($(this));">
           	   	   	  		<span>
           	   	   	  			通知中心
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
					  <li>
           	   	   	  	<div class="ncBoard" onmouseover="mouseOverNcboard($(this));" onmouseout="mouseOutNcboard($(this));">
           	   	   	  		<span>
           	   	   	  			超级管理员
           	   	   	  		</span>
           	   	   	  	</div>
           	   	   	  </li>
			
           	   	   </ul>
           	   </div>
           </div>
        </div>
        <br/><br/>    
     </div>
     <div id="foot" style="font-family:微软雅黑;border-radius:6px;margin-top:-5%;box-shadow: 0px 0px 18px 0px;width:100%;height:30%;background-color:#CCCCCC;left:0px;bottom:0px;">   
       <div style="font-family:微软雅黑;margin-top:5%;">  
	     <div>
	        <a target="_blank" style="text-decoration:none;" href="#"><span class="si">联系我们</span></a>
	     </div><br/>
	     <div style="font-family:微软雅黑;display:inline;">
		      <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si">首页</span></div>&nbsp;&nbsp;&nbsp;
              <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si">活动</span></div>&nbsp;&nbsp;&nbsp;
              <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si">资讯</span></div>&nbsp;&nbsp;&nbsp;
              <div class="barEl" onmouseover="cc($(this))" onmouseout="ccB($(this))"><span class="si" onclick="window.location = 'pfs?p=AdminManage/AdminManage.jsp';">管理员中心</span></div>&nbsp;&nbsp;&nbsp;
	     </div><br/>
	     <div>
	          <a target="_blank" style="text-decoration:none;" href="http://www.scut.edu.cn/"><span style="color:#999999;" class="xsi">友情链接:华南理工大学官网</span></a>
	     </div><br/>
	     <div>
	        <span class="xsi">备案信息:xxxxxxxxxxxxxxxxxxxxxx</span>
	     </div>
	   </div>
     </div>
   </div>   
</body>

<script type="text/javascript">
	 var w=window.innerWidth
     || document.documentElement.clientWidth
     || document.body.clientWidth;
     var _w = parseInt(w);   //获取屏幕宽度
     
	 if(_w>1200){
		 var v = (_w -1200)/2;
		 _w = 1200;
		 $("#wrap").css("width","1200px");
		 $("#wrap").css("margin-left",(v-8)+"px");
         $("#wrap").css("margin-right",(_w+v-8)+"px");
         $(".blackC_t").css("width","1200px");
         $(".blackC_t").css("height",_w*0.1);
         $("#tbar").css("width","1200px"); 
         $("#tbar").css("height",_w*0.1);
	 }else{
		 $("#wrap").css("width","100%");
		 $("#wrap").css("margin-left",-8+"px");
         //$("#wrap").css("margin-right",_w+"px");
         
         $(".blackC_t").css("width",_w+"px");
         $(".blackC_t").css("height",_w*0.1);
         $("#tbar").css("width",_w+"px");  
         $(".blackC_t").css("height",_w*0.1);
	 }
</script>
</html> 